package com.itheima.tliasmanagement.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;

@Slf4j
//@Component
@Aspect
@Order(0)
public class MyAspect3 {

    @Pointcut("execution(* com.itheima.tliasmanagement.service.impl.DeptServiceImpl.*(..))")
    public void pc(){
    }

    @Before("pc()")
    public void before(JoinPoint jp) throws Throwable {
        log.info("MyAspect3 - > before");
    }

    @After("pc()")
    public void after() throws Throwable {
        log.info("MyAspect3 -> After");
    }


}
